/**
 * @description  : demo 示例
 * @descriptionDetail : 示例
 * @copyright    : 浙江烟草
 * @author       : mc
 * @create       : 2022-12-05 16:15:51
 */
<template>
  <view>
    <view @tap="test">
      点击试试
    </view>
    <signature :visible="show" @save="onSignSave"></signature>
    <img style="width: 100%;" :src="imgSrc" alt="未签名">
  </view>
</template>
<script>
import Signature from "@/components/signature.vue";
export default {
  components: {
    Signature,
  },
  data() {
    return {
      show: true,
      imgSrc: "",
    }
  },
  methods: {
    test() {
      console.log("点击父组件");
      this.show = true;
    },
    onSignSave(signImg) {
      this.show = false;
      // 保存签名图片..
      this.imgSrc = signImg;
    },
  },
}
</script>
<style lang="scss" scoped>
view {
  border: 1px solid red;
  padding: 50px;
}
</style>